﻿import com.mixmedia.motion.MotionTween;
/**
   ActionScript Class File -- Created with SAPIEN Technologies PrimalScript 3.1
   
   @class  
   @package
   @author Colin Leung
   @codehint 
   @example 
   @tooltip 
   version 1.0 just work for beanstalk presentation.
*/

class com.mixmedia.control.ToolTips extends MovieClip{
	public var show_mt:Object;
	public var offset:Object;//point object
	public var tip_txt:TextField;
	
	public function ToolTips(){
		_alpha = 0;
		_visible = false;
		offset={x:0,y:10};
		show_mt = new MotionTween(this,{a:100,dur:5});
	};

	public function show(){
		with (tip_txt) {
		  border = true;
		  borderColor = 0x000000;
		  multiline = true;
		  wordWrap = true;
		  autoSize = "left";
		}
		this._x = (_root._xmouse+this._width<800)?_root._xmouse:790-this._width;
		this._y = (_root._ymouse+this._height<600)?_root._ymouse:600 - this._height;
		show_mt.startTween({x:_x+offset.x,y:_y+offset.y});
	};
	
	public function hide(){
		show_mt.killTween();
		this._alpha=0;
		this._visible=false;
	};
}
